<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript" src="../../jquery/jquery-1.8.3.js"></script>

<script>
	var parentObj =window.parent;
	//var langurl = parentObj.langurl.value;
	var langurl = parentObj.document.getElementById("langurl").value;
	var mutiLangScript = "<script type='text/javascript' src='" + langurl + "'><\/script>";
	document.write(mutiLangScript);
	window.onload = function() {
		window.parent.iframeLoaded();
	}

</script>

</head>
<body>
<script type="text/javascript">


</script>
	<div>
	<table style="width: auto">
		<tbody id="template_header_key">
			<tr bgcolor="#E6E6E6">
				<!--begin dangzhenghui 20170310 TASK #1752 【改进】online的[页面属性] [校验字典] [外键] 没有序号-->
				<th style="width: 30px;" align="center" bgcolor="#EEEEEE" mutiLang_id="sequence">序号</th>
				<!--end dangzhenghui 20170310 TASK #1752 【改进】online的[页面属性] [校验字典] [外键] 没有序号-->
				<th align="center" bgcolor="#EEEEEE" mutiLang_id="fieldname">字段名称</th>
				<th align="center" bgcolor="#EEEEEE" mutiLang_id="fieldremark">字段备注</th>

				<th align="center" bgcolor="#EEEEEE">主表</th>
				<th align="center" bgcolor="#EEEEEE" >主表字段</th>
				<th align="center" bgcolor="#EEEEEE" >操作</th>
			</tr>
		</tbody>
		<tbody id="add_column_table_template_key">
			<tr>
				<!--begin dangzhenghui 20170310 TASK #1752 【改进】online的[页面属性] [校验字典] [外键] 没有序号-->
				<td style="width: 30px;" ><a name="rownumber[#rindex#]"></a></td>
				<!--end dangzhenghui 20170310 TASK #1752 【改进】online的[页面属性] [校验字典] [外键] 没有序号-->
				<td align="left"><input style="width: 120px;" type="text"
					name="columnsfieldName_index"
					readonly="readonly" /></td>
				<td align="left"><input style="width: 120px;" type="text"
					name="columnscontent_index"
					readonly="readonly" /></td>
				<!--选择项-->
				<td align="left">
					<select class="tableSelect"  name="columns[#index#].foreignTableId" maxlength="150" style="width: 200px;">
						<option value="">请选择</option>
					</select>

				</td>
				<td align="left">
					<select class="fieldSelect" name="columns[#index#].foreignFieldId" maxlength="150" style="width: 200px;">
						<option value="">请选择</option>
					</select>
				</td>
				<td align="left">
					<a class="alink" name="#index#"  href="javascript:void(0);" onclick="configTable(this)">编辑表</a>
				</td>
			</tr>
		</tbody>
	</table>
</div>
<script type="text/javascript">

</script>
</body>
</html>

<script type="text/javascript">


    /**
     * 获取表列表
     * @param jformType
     */
    function findHeadList123(jformType) {

        $.ajax({
            url:'../../../cgFormHeadController.do?findHeadList',
            type:'POST',
            dataType:'JSON',
            data:{
//                jformType:jformType
            },
            success:function(res){
                if(res.success){
                    var typeList = res.obj;
                    var select=$('.tableSelect');
                    select.find("option:gt(0)").remove();
                    for(var i = 0; i < typeList.length; i++){
                        var html = '<option value="'+typeList[i][0]+'">'+typeList[i][1]+'('+typeList[i][2]+')'+'</option>';
                        select.append(html);
                    }
                }
            }
        });
    }
$(function(){
	$("[mutiLang_id]").each(function() {
	    var multiLan=eval(this.attributes["mutiLang_id"].value);
	    if (multiLan){
            this.innerText =multiLan;
        }
	});

	//获取选中类型
    findHeadList123();
})
</script>